package com.hongyue.zuoTi3;

import java.util.Objects;

/*
		姓名：String类型
		年龄：int
		身高：double
		婚否：boolean
		性别：char
 */
public class XueSheng {
    private String xingMing;
    private int nianLing;
    private double shenGao;
    private boolean hunFou;
    private char xingBie;

    @Override
    public String toString() {
        return "XueSheng{" +
                "xingMing='" + xingMing + '\'' +
                ", nianLing=" + nianLing +
                ", shenGao=" + shenGao +
                ", hunFou=" + hunFou +
                ", xingBie=" + xingBie +
                '}';
    }

    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        XueSheng xueSheng = (XueSheng) o;
        return nianLing == xueSheng.nianLing &&
                Double.compare(xueSheng.shenGao, shenGao) == 0 &&
                hunFou == xueSheng.hunFou &&
                xingBie == xueSheng.xingBie &&
                Objects.equals(xingMing, xueSheng.xingMing);
    }

    @Override
    public int hashCode() {
        return Objects.hash(xingMing, nianLing, shenGao, hunFou, xingBie);
    }

    public XueSheng(String xingMing, int nianLing, double shenGao, boolean hunFou, char xingBie) {
        this.xingMing = xingMing;
        this.nianLing = nianLing;
        this.shenGao = shenGao;
        this.hunFou = hunFou;
        this.xingBie = xingBie;
    }

    public XueSheng() {
    }

    public String getXingMing() {
        return xingMing;
    }

    public void setXingMing(String xingMing) {
        this.xingMing = xingMing;
    }

    public int getNianLing() {
        return nianLing;
    }

    public void setNianLing(int nianLing) {
        this.nianLing = nianLing;
    }

    public double getShenGao() {
        return shenGao;
    }

    public void setShenGao(double shenGao) {
        this.shenGao = shenGao;
    }

    public boolean isHunFou() {
        return hunFou;
    }

    public void setHunFou(boolean hunFou) {
        this.hunFou = hunFou;
    }

    public char getXingBie() {
        return xingBie;
    }

    public void setXingBie(char xingBie) {
        this.xingBie = xingBie;
    }
}
